<template lang="html">
  <div class="container">
    <div class="userinfo-card">
      <div class="userinfo-card-header">
        <div class="upload-picture">
          <i class="material-icons">local_see</i>
          <a href="#">上传封面图片</a>
        </div>
      </div>
      <div class="userinfo-content">
        <div class="userinfo-content-header">
          <h1>ccswust_platform_pc</h1>
          <span>返回我的主页</span>
        </div>

        <div class="row">
          <div class="row-title">cc-swust</div>
          <div class="row-message" >
            <span> lorem </span>
            <div class="change-button" v-if="!CHANGE_NAME" @click="visible()">
              <i class="material-icons">mode_edit</i>
              <span>修改</span>
            </div>
            <div class="name-option" v-if="CHANGE_NAME" >
              <input type="text" >
              <v-button @practice='visible()'></v-button>
            </div>
          </div>
        </div>

      </div>
    </div>
  </div>
</template>

<script>

import { vButton, vRow } from '~/components/common'

export default {

  components: {
    vButton,
    vRow
  },

  data () {
    return {
      CHANGE_NAME: false
    }
  },

  methods: {
    visible () {
      this.CHANGE_NAME = !this.CHANGE_NAME
      console.log('here')
    }
  }
}
</script>

<style lang="scss" scoped>

* {
  box-sizing: border-box;
}

.container {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #eee;

  .userinfo-card {
    width: 1000px;
    height: 1125px;
    background-color: #555;
    margin: 0 auto;
  }
  .userinfo-card-header {
    width: 1000px;
    height: 240px;
    background-color: #999;
    position: relative;

      .upload-picture {
        position: absolute;
        top: 50px;
        right: 50px;
        width: 114px;
        height: 36px;
        display: flex;
        justify-content: space-around;
        border: 1px solid #ccd8e1;
        padding: 2px;
        border-radius: 3px;

        &:hover {
          background-color: rgba(207,216,230,.1);
        }

        i {
          color: #ccd8e1;
          line-height: 32px;
          font-size: 18px;
        }

        a{
          text-decoration: none;
          display: block;
          text-align: center;
          line-height: 32px;
          background-color: transparent;

          color: #ccd8e1;
          cursor: pointer;
          user-select: none;
          font-size: 14px;

        }
      }
  }
  .userinfo-content {
    width: 1000px;
    height: 845px;
    padding-top: 16px;
    padding-left: 196px;
    background-color: #111;

    .userinfo-content-header {
      color: #fff;
      display: flex;
      width: 764px;
      justify-content: space-between;

      h1 {
        margin: 0;
      }

      span {
        height: 36px;
        line-height: 36px;
      }
    }

    .row {

      width: 764px;
      padding: 30px 0px;
      border-bottom: 1px solid rgb(235, 238, 245);
      display: flex;

      .row-title {

        width: 140px;
        height: 36px;
        line-height: 36px;
        font-size: 15px;
        font-weight: 600;
        background-color: #886655;
      }

      .row-message {

        width: 560px;
        background-color: #994411;
        display: flex;

        span {

          height: 36px;
          line-height: 36px;
          margin-right: 16px;
        }

        .change-button {

          display: flex;
          align-items: center;
          cursor: pointer;

          i {
            font-size: 15px;
            color: #175199;
          }

          span {
            color: #175199;
          }
        }

        .name-option {

          input {
            width: 538px;
            height: 32px;
            border-radius: 3px;
            padding: 4px 10px;
            margin-bottom: 28px;
          }
        }
      }
    }
  }
}


</style>
